imwayland: Collect return value from ::delete-surrounding signal
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 28 Sep 2018 15:47:56 +0000 (17:47 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 18 Dec 2018 19:27:12 +0000 (20:27 +0100)
There's not much we can do about the signal not being handled, but
we should fetch the return value anyway.

gtk/gtkimcontextwayland.c

index 50add11bfd75a72ed8edfe5a22bbc263c5902852..891d948c8a5f6010973ac08a7fee6133c59eba59 100644 (file)
@@ -224,18 +224,18 @@ text_input_delete_surrounding_text_apply (GtkIMContextWaylandGlobal *global,
   gboolean valid)
 {
   GtkIMContextWayland *context;
-  
+  gboolean retval;
   gint len;
   struct surrounding_delete defaults = {0};
-  
+
   context = GTK_IM_CONTEXT_WAYLAND (global->current);
-  
+
   len = context->pending_surrounding_delete.after_length
       + context->pending_surrounding_delete.before_length;
   if (len > 0 && valid)
     g_signal_emit_by_name (global->current, "delete-surrounding",
                            -context->pending_surrounding_delete.before_length,
-                           len);
+                           len, &retval);
   context->pending_surrounding_delete = defaults;
 }